package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.qo.EmployeeQo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    //按主键id删除员工
    int deleteByPrimaryKey(Long id);

    //增加员工
    int insert(Employee record);

    //按主键id查询员工
    Employee selectByPrimaryKey(Long id);

    //查询所有员工
    List<Employee> selectAll();

    //修改员工
    int updateByPrimaryKey(Employee record);

    //登录
    Employee login(@Param("username") String username, @Param("password")String password);

    //条件查询员工信息
    public List<Employee> selectByCondition(EmployeeQo qo);

    //保存员工角色信息
    public void insertEmpRole(@Param("empId") Long empId,@Param("roleId")Long roleId);

    //根据员工id删除员工角色
    public void deleteRole(Long empId);
}